#!/bin/sh
###
# execute
###

#patch the dvd
# TODO: extract NBBMCLI.app
/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Resources/NetbookBootMakerCLI.app/Contents/MacOS/NetbookBootMakerCLI | logger

# remove the modified windowserver, due to the way Union works on Mac, the orig file will be exposed
rm /System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Resources/WindowServer

# run the original windowserver
/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Resources/WindowServer -daemon

# Unmount ramdisk made by netbook installer. They should be listed here:
/tmp/unmount.sh